package com.jack.payment.entity.business;

import com.jack.payment.annotation.BigDecimalRange;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "请求支付时, 最基础的请求参数")
public class RequestPayBo implements Serializable {
    @Schema(description = "订单号")
    private String orderNo;
    @Schema(description = "渠道")
    private String channel;
    @Schema(description = "发起支付时的金额", minLength = 0, maxLength = 10000)
    @BigDecimalRange(message = "价格不能少于0.70 , 不能大于10000 哦")
    private BigDecimal amount;
    @Schema(description = "调用者方的 回调地址")
    @NotBlank(message = "回调地址不能为空哦")
    private String webhook;
    @Schema(description = "支付时使用的平台支付 [web, qrcode, app, applet]")
    @NotBlank(message = "回调地址不能为空哦")
    private String payPlatform;
    @Schema(description = "携带的支付标题或描述")
    private String describe;
    @Schema(description = "回调时附加数据")
    @Size(max = 512, message = "附加数据长度不能超过512个字符")
    private String attach;


    @Schema(description = "微信小程序支付必带")
    private String openId;

    @Schema(description = "币种")
    private String currency;
}
